import {createRouter, createWebHashHistory, RouteRecordRaw} from "vue-router";

// 配置路由映射
const routes: Array<RouteRecordRaw> = [
    {
        path: '/', // 指定请求的路径
        component: () => import('../views/Login.vue'),
        children: [{
            path: '/Login',
            component: () => import('../views/Login.vue')
        }]
    },{
        path: '/test1',
        component: () => import('../views/Home.vue')
    }

]

// 创建路由对象
const router = createRouter({
    history: createWebHashHistory('/index.html'), // 历史记录
    routes // 路由的映射
})

// 导出路由，便于挂载
export default router
